<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>系统配置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" type="text/css" href="/Public/admin/layui/css/layui.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/bootstrap/css/bootstrap.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/global.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/css/personal.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/css/page.css" media="all">
  <script type="text/javascript" src="/Public/admin/jedate/jquery-1.7.2.js"></script>
</head>
<body>
  <blockquote class="layui-elem-quote mylog-info-tit">
    <ul class="layui-tab-title">
        <a href="/admin/system/index"><li class="layui-btn"><i class="layui-icon"></i>返回</li></a>
        <a href="/admin/system/add"><li class="layui-btn"><i class="layui-icon"></i>添加配置项</li></a>
    </ul>
</blockquote>
  <div class="layui-tab layui-tab-card">
  <ul class="layui-tab-title">
    <li <?php if($groupid == 0): ?>class="layui-this"<?php else: ?>class=""<?php endif; ?>> <a href="<?php echo U('config',array('groupid'=> 0));?>">全部</a></li> 
    <?php if(is_array($configgroup)): foreach($configgroup as $key=>$v): ?><li <?php if($key == $groupid): ?>class="layui-this"<?php else: ?>class=""<?php endif; ?>><a href="<?php echo U('config',array('groupid'=> $key));?>"><?php echo ($v); ?></a>&nbsp;</li><?php endforeach; endif; ?>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
      <table class="layui-table">
        <colgroup>
          <col width="150">
          <col width="200">
          <col>
        </colgroup>
        <thead>
          <tr>
            <th>编号</th>
            <th>名称</th>
            <th>标题</th>
            <th>分组</th>
            <th>类型</th>
            <th>操作</th>
          </tr> 
        </thead>
        <tbody>
          <?php if(is_array($vlist)): foreach($vlist as $key=>$v): ?><tr>
            <td><?php echo ($v["id"]); ?></td>
            <td class="aleft"><?php echo ($v["name"]); ?></td>
            <td ><?php echo ($v["title"]); ?></td>
            <td><?php echo (get_item_value('configgroup',$v["groupid"])); ?></td>                
            <td><?php echo (get_item_value('configtype',$v["typeid"])); ?></td>
            <td>
              <a href="<?php echo U('edit',array('id' => $v['id']));?>"><button class="layui-btn"><i class="layui-icon">&#xe642;</i></button></a>
              <a href="<?php echo U('del', array('id' => $v['id']));?>"><button class="layui-btn"><i class="layui-icon">&#xe640;</i></button></a>
            </td>
          </tr><?php endforeach; endif; ?>
        </tbody>
      </table>
    </div>
    <div id="page" class="green-black"><?php echo ($page); ?></div>
  </div>
</div>

 
<script src="/Public/admin/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('element', function(){
  var $ = layui.jquery
  ,element = layui.element(); //Tab的切换功能，切换事件监听等，需要依赖element模块
});
layui.use('form', function(){
  var form = layui.form();
  });
</script>

</body>
</html>